﻿CREATE TABLE [dbo].[Especializacao] (
    [Id]                    INT           IDENTITY (1, 1) NOT NULL,
    [IdCurriculo]           INT           NOT NULL,
    [IdTipoEspecializacao]  INT           NOT NULL,
    [IdNivelEspecializacao] INT           NULL,
    [DataInicio]            DATETIME      NOT NULL,
    [DataFinal]             DATETIME      NULL,
    [Titulo]                VARCHAR (60)  NOT NULL,
    [Instituicao]           VARCHAR (50)  NOT NULL,
    [Descricao]             VARCHAR (255) NOT NULL,
    [Ativo]                 BIT           DEFAULT ('1') NOT NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF),
    FOREIGN KEY ([IdCurriculo]) REFERENCES [dbo].[Curriculo] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION,
    FOREIGN KEY ([IdTipoEspecializacao]) REFERENCES [dbo].[TipoEspecializacao] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION,
    FOREIGN KEY ([IdNivelEspecializacao]) REFERENCES [dbo].[NivelEspecializacao] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION
);



